//
//  UIView+SLQuickInit.h
//  SLBlindBox
//
//  Created by 童玉龙 on 2022/4/22.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (SLQuickInit)

+ (UIView *)quickInitFrame:(CGRect)frame bgColor:(UIColor *)backgroundColor;
+ (UIView *)quickInitFrame:(CGRect)frame bgColorStr:(NSString *)backgroundColor;

@end

@interface UILabel (SLQuickInit)

+ (UILabel *)quickInitFont:(UIFont *)font color:(UIColor *)textColor;
+ (UILabel *)quickInitFont:(UIFont *)font colorStr:(NSString *)textColor;
+ (UILabel *)quickInitFont:(UIFont *)font color:(UIColor *)textColor text:(nullable NSString *)text;
+ (UILabel *)quickInitFont:(UIFont *)font colorStr:(NSString *)textColor text:(nullable NSString *)text;

@end


@interface UIButton (SLQuickInit)


+ (__kindof UIButton *)quickInitImageNamed:(NSString *)imageName;
+ (__kindof UIButton *)quickInitImageNamed:(NSString *)imageName selectedImage:(nullable NSString *)selectedImage;
+ (__kindof UIButton *)quickInitFrame:(CGRect)frame imageNamed:(NSString *)imageName;
+ (__kindof UIButton *)quickInitFont:(UIFont *)font color:(UIColor *)titleColor title:(nullable NSString *)title;
+ (__kindof UIButton *)quickInitFont:(UIFont *)font colorStr:(NSString *)titleColor title:(nullable NSString *)title;

- (void)setImageNormal:(UIImage *)image;
- (void)setImageNormalNamed:(NSString *)image;
- (void)setImageStr:(NSString *)imageName forState:(UIControlState)state;
- (void)addTouncdUnInsideTarget:(id)target action:(SEL)action;

@end


@interface UIImageView (SLQuickInit)

+ (UIImageView *)quickInitImageNamed:(NSString *)imageName;
+ (UIImageView *)quickInitFrame:(CGRect)frame imageNamed:(NSString *)imageName;

@end

NS_ASSUME_NONNULL_END
